package com.gaofans.vertx.boot.web.annotation;

import io.vertx.core.Handler;
import io.vertx.core.http.HttpMethod;
import io.vertx.ext.web.RoutingContext;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

/**
 * vertx web 路由映射注解
 * @author GaoFans
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RouteMapping {

    @AliasFor("path")
    String value() default "";

    @AliasFor("value")
    String path() default "";

    int order() default 0;

    boolean requestBody() default true;

    HttpMethod[] method() default {};

    String[] headers() default {};

    String[] consumes() default {};

    String[] produces() default {};

    Class<? extends Handler<RoutingContext>>[] handlers() default {};

    Class<? extends Handler<RoutingContext>>[] excludeHandlers() default {};

}
